<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>小程序助手-登录</title>
		<meta name="keywords" content="小程序助手,小程序商城,微信小程序,小程序">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<link rel="stylesheet" href="${basePath }static/miniApp/css/box_style.css" />
		<script type="text/javascript" src="${basePath }static/miniApp/js/jquery-1.7.1.min.js" ></script>
		<script type="text/javascript" src="${basePath }static/miniApp/js/bos_js.js" ></script>
	</head>
	<body>
		<form action="${basePath }miniapp/dologin" method="post">
			<div class="box_view">
				<div class="box_login">
					<div class="box_login_nav">
						<ul>
							<li class="click" id="login">登录</li>
							<li id="register">注册</li>
						</ul>
					</div>
					<!--登录-->
					<input class="input_box admin login" placeholder="用户名" name='login_name' type="text">
					<input class="input_box password login" placeholder="密码" name='login_pwd' type="password">
					<input type="hidden" name="opetype" id="opetype" value="0" /> 
					<!--注册-->
					<input class="input_box admin register" placeholder="邮箱地址" name='email' type="text">
					<input class="input_box name register" placeholder="昵称"  name='name' type="text">
					<input class="input_box password register" placeholder="密码" name='reg_pwd' type="password">
					<input class="input_box password register" placeholder="密码确认" type="password">
					<button class="box_button">登录</button>
				</div>
				<div class="box_view_bg"></div>
			</div>
		</form>
	</body>
	 <script type="text/javascript">
 	// 如果在框架或在对话框中，则弹出提示并跳转到首页
	if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('.leftcontent').length > 0 ){
		alert('未登录或登录超时。请重新登录，谢谢！');
		top.location = "<%=basePath %>manager/tologin";
	}
 	var errorcode = '${pd.errcode}';
 	if(errorcode == '0'){
 		alert("账号或密码错误！");
 	}
    </script>
</html>
